<include file="Public:header" />
<style>

.list-group {
	padding: 0;
}
.list-group li {
	border-color:#dff0d8;
}
.list-group li a {
	display: block;
}
.list-group li a .badge {
	float: right;
}
.list-group-item:first-child {
	
}

@media (min-width: 50px){
	     .nav-justified>li{
		display: table-cell;
		width: 1%;
	}

.panel-body {
    padding: 5px 5px;
}
.panel{margin-bottom:0px;}
.nav-justified>li>a{margin-bottom:0; border-radius:0;}	
	
</style>

<link rel="stylesheet" type="text/css" href="__PUBLIC__/Js/validform/style.css">
<script src="__PUBLIC__/Js/validform/Validform.js"></script>


<div style="padding:20px; padding-bottom:0px;">
  <div class="panel-body" style=" padding:25px; background: #fff; border:2px solid rgba(176,237,161,1.00); border-radius:6px; text-align:center;">
    <span class="glyphicon glyphicon-exclamation-sign" style="font-size:52px; color:rgba(30,151,66,1.00)" aria-hidden="true"></span>
    <p style="color: rgba(35,123,53,1.00); font-size:16px;"><strong>你当前可用于提现￥{$detail_momey}元</strong></p>
    <p style="line-height:30px;">提现需要支付少许手续费,将从余额中扣除!</p>
  </div>
</div>

<form class="checkoutform" id="checkout" action="<?php echo U('Member_account_log/detail');?>" method="post">
<div style="padding:10px; padding-bottom:0px; width:100%;">
      <ul class="nav nav-pills nav-justified" style="border:1px solid #bce8f1;background:#fff;">
          <li role="presentation" <if condition="$txstate eq 0">class="active"</if>><a href="{:U('detail',array('txstate'=>0))}">微信红包提现</a></li>
          <li role="presentation" <if condition="$txstate eq 1">class="active"</if>><a href="{:U('detail',array('txstate'=>1))}">大额提现</a></li>
 </div>
 


<!-- 微信红包提现 -->
<if condition="$txstate eq 0">

<div style="padding:10px;">
 <div class="panel panel-info" style=" background: rgba(174,218,240,1.00);">
    <div style="padding:15px;">
    <p style="color:rgba(83,142,221,1.00); line-height:25px;"><strong>北京时间每天0:00-8.00，微信不支持红包提现</strong></p>
    <p style="color:rgba(83,142,221,1.00); ">每人/天最高限额为20000.00元，如需提现更多请联系官网微信客服</p>
    </div>    
  </div>
  
  <div class="panel panel-success" style="margin-top:15px;">
  <div class="panel-heading">提现金额*</div>
  <div class="panel-body">
  <input type="text" name="demomey" datatype="n" id="demomey" class="form-control" placeholder="￥1.00-￥200.00" >
    <input type="hidden" value="0" name="txstate" id="txstate" >
    <input type="hidden" value="0" name="men_brinkid" id="men_brinkid" >
  </div>
  </div>
  
  <div style="margin-top:15px;">
    <p><strong>手续费</strong></p>
    <p>当前手续费为<span style="color:red;">{$poundage}%</span></p>
  </div>
  
</div>

<div class="botton" style="width:100%; height:45px; font-size:18px; text-align:center; background: rgba(192,130,131,1.00);  line-height:45px;" onClick="checkouts()" >立即提现</div> 



<!-- 微信大额提现 --> 
<else />

 <div style="padding:10px;">
 <div class="panel panel-info" style=" background: rgba(174,218,240,1.00);">
    <div style="padding:15px;">
    <p style="color:rgba(83,142,221,1.00); line-height:25px;"><strong>每人/天最高限额为20000.00元</strong></p>
    <p style="color:rgba(83,142,221,1.00); ">如需提现更多请联系官网微信客服</p>
    </div>    
  </div>
  
  <div class="panel panel-success" style="margin-top:15px;">
  <div class="panel-heading">提现金额*</div>
  <div class="panel-body">
  <input type="text" name="demomey" datatype="n" id="demomey"  class="form-control" placeholder="￥1000.00-￥20000.0" >
    <input type="hidden" value="1" name="txstate" id="txstate" >
  </div>
  </div>
  
  <div style="margin-top:15px;">
    <p><strong>手续费</strong></p>
    <p>当前手续费为<span style="color:red;">{$poundage}%</span></p>
  </div>
  
</div>


<div class="panel panel-success" style="margin:5px;">
  <div class="panel-heading">
   <div style=" float:left;">
    <h3 class="panel-title">选择提现账户</h3>
    </div>
        <div style=" float:right;">
        <a href="{:U('address')}">
         <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
        </a>
        </div>
        <div style="clear:both;"></div> 
  </div>
  <div class="panel-body" style="padding: 5px; ">
    <div class="list-group">
        <ul class="list-group">
            <volist name="bank" id="vo">
            <li class="list-group-item">
            <div class="radio">
              <label>
                <input type="radio" name="men_brinkid" id="men_brinkid" value="{$vo.bank_id}" >
                账户:{$vo.account} <br>
                账户名:{$vo.accountname}
              </label>
               <!-- 删除账户名 -->
                <div style=" position:absolute; right:5px; margin-top:-30px;">
                 <a href="{:U('deladr',array('id'=>$vo['bank_id']))}" onClick="return confirm('请确认删除提款账号');">
                 <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>
                 </a>
                </div>
               <!-- -->
            </div>
            </li>
            </volist>            
        </ul>
    </div> 
  </div>
</div>

<div class="botton" style="width:100%; height:45px; font-size:18px; text-align:center; background: rgba(192,130,131,1.00);  line-height:45px;" onClick="checkouts()" >立即提现</div> 

</if> 



</form>

<script type="text/javascript">
$(".checkoutform").Validform();
document.getElementsByName("men_brinkid")[0].checked="checked";





function checkouts(){
	
	var demomey = document.getElementById("demomey").value;

	var men_brinkid = document.getElementById("men_brinkid").value;

	var txstate = document.getElementById("txstate").value;

	
	$.ajax({
			url:'{:U('detail')}',
			type:'post',
			dataType: 'json',
			data:{'demomey':demomey,'men_brinkid':men_brinkid,'txstate':txstate},
			success: function(data){
			      
				  if(data.status == 1){
				      
					  alert(data.info);exit;
				  
				  }else{
				     
					 document.getElementById('checkout').submit();exit;
				  
				  }
			
			
			},
			error: function(){ alert('参数错误'); }
	});
	
}
</script>
<include file="Public:footer" />